﻿<Application
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:app="clr-namespace:BookClub"
  xmlns:fx="clr-namespace:BookClub.Core"
  x:Class="BookClub.App">
  
  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Themes/Styles.xaml" />
      </ResourceDictionary.MergedDictionaries>
      
      <app:WebContextInstance x:Key="webContext" />
      
      <fx:VisibilityConverter x:Key="visibilityConverter" />
      <fx:VisibilityConverter x:Key="invisibilityConverter" Inverse="true" />
      <fx:UserConverter x:Key="requiresAuthConverter" RequiresAuthentication="true" />
      <fx:UserConverter x:Key="requiresAdminConverter" RequiresAuthentication="true" RequiredRole="Admin" />
      <fx:ImageLoader x:Key="bookCoverLoader" UriFormat="http://images.amazon.com/images/P/{0}.01._SCLZZZZZZZ_PU_PU-5_.jpg" />
      <fx:Truncator x:Key="truncator" MaxWords="50" />
    </ResourceDictionary>
  </Application.Resources>
  
  <Application.ApplicationLifetimeObjects>
    <app:WebContext />
  </Application.ApplicationLifetimeObjects>
</Application>
